/*
 * Stock.java
 *
 *  
 */
package org.msb.finance.data;

/**
 * 
 * 
 * @author Marc
 * 
 */
public class Stock extends Investment {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * The name of this {@code Stock} object. This field is immutable.
	 */
	private final String name;

	/**
	 * 
	 */
	private String symbol;

	/**
	 * 
	 */
	private String memo;

	/**
	 * 
	 * @param name
	 */
	public Stock(String name) {
		if (null == name) {
			throw new IllegalArgumentException();
		}

		this.name = name;
	}

	/**
	 * 
	 * @return
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * 
	 * @return
	 */
	public String getSymbol() {
		return this.symbol;
	}

	/**
	 * 
	 * @param symbol
	 */
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	/**
	 * 
	 * @return
	 */
	public String getMemo() {
		return this.memo;
	}

	/**
	 * 
	 * @param memo
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		return this.name.equals(obj);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return this.name.hashCode();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.msb.finance.data.Investment#getApplicableActions()
	 */
	@Override
	public InvestmentAction[] getApplicableActions() {
		// TODO Auto-generated method stub
		return null;
	}

}
